package com.xja.book.service.impl;

import com.xja.book.entity.Book;
import com.xja.book.mapper.BookMapper;
import com.xja.book.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class BookServiceImpl implements BookService {
    @Autowired
    private BookMapper bookMapper;
    @Override
    public int  addBook(Book book) {
       return bookMapper.insertSelective(book);
    }

    @Override
    public int  deleteBook(int id) {
       return bookMapper.deleteByPrimaryKey(id);
    }
}
